## Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([rtems-c-src-lib-libbsp-powerpc-gen83xx],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
AC_CONFIG_SRCDIR([bsp_specs])
RTEMS_TOP(../../../../../..)

RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
RTEMS_BSP_CONFIGURE

RTEMS_PROG_CC_FOR_TARGET
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS

RTEMS_BSPOPTS_SET_DATA_CACHE_ENABLED([*],[1])
RTEMS_BSPOPTS_HELP_DATA_CACHE_ENABLED

RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([*],[1])
RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED

RTEMS_BSPOPTS_SET([BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN],[indicate that the interrupt stack is at the work area begin])

RTEMS_BSPOPTS_SET([MPC83XX_BOARD_MPC8313ERDB],[mpc8313erdb],[1])
RTEMS_BSPOPTS_HELP([MPC83XX_BOARD_MPC8313ERDB],
[if defined, then use settings for the MPC8313ERDB board])

RTEMS_BSPOPTS_SET([MPC83XX_BOARD_MPC8349EAMDS],[mpc8349eamds],[1])
RTEMS_BSPOPTS_HELP([MPC83XX_BOARD_MPC8349EAMDS],
[if defined, then use settings for the MPC8349EAMDS board])

RTEMS_BSPOPTS_SET([MPC83XX_BOARD_HSC_CM01],[hsc_cm01],[1])
RTEMS_BSPOPTS_HELP([MPC83XX_BOARD_HSC_CM01],
[if defined, then use settings for the HSC_CM01 board])

RTEMS_BSPOPTS_SET([MPC83XX_BOARD_MPC8309SOM],[mpc8309som],[1])
RTEMS_BSPOPTS_HELP([MPC83XX_BOARD_MPC8309SOM],
[if defined, then use settings for the MPC8309SOM board])

RTEMS_BSPOPTS_SET([MPC83XX_BOARD_BR_UID],[br_uid],[1])
RTEMS_BSPOPTS_HELP([MPC83XX_BOARD_BR_UID],
[if defined, then use settings for the BR UID board])

RTEMS_BSPOPTS_SET([MPC83XX_NETWORK_INTERFACE_0_PHY_ADDR],[mpc8309som],[0x11])
RTEMS_BSPOPTS_SET([MPC83XX_NETWORK_INTERFACE_0_PHY_ADDR],[br_uid],[-1])
RTEMS_BSPOPTS_HELP([MPC83XX_NETWORK_INTERFACE_0_PHY_ADDR],
[PHY address of network interface 0])

RTEMS_BSPOPTS_SET([MPC83XX_CHIP_TYPE],[mpc8309som],[8309])
RTEMS_BSPOPTS_SET([MPC83XX_CHIP_TYPE],[br_uid],[8309])
RTEMS_BSPOPTS_SET([MPC83XX_CHIP_TYPE],[mpc8349eamds],[8349])
RTEMS_BSPOPTS_SET([MPC83XX_CHIP_TYPE],[hsc_cm01],[8349])
RTEMS_BSPOPTS_SET([MPC83XX_CHIP_TYPE],[*],[8313])
RTEMS_BSPOPTS_HELP([MPC83XX_CHIP_TYPE],[chip type of the MPC83XX family])

RTEMS_BSPOPTS_SET([MPC83XX_HAS_NAND_LP_FLASH_ON_CS0],[br_uid],[1])
RTEMS_BSPOPTS_SET([MPC83XX_HAS_NAND_LP_FLASH_ON_CS0],[*],[])
RTEMS_BSPOPTS_HELP([MPC83XX_HAS_NAND_LP_FLASH_ON_CS0],[indicates if the board has a NAND large page flash on chip select 0])

RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[hsc_cm01],[9600])
RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[115200])
RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD],[default baud for console and other serial devices])

RTEMS_BSPOPTS_SET([BSP_USE_UART_INTERRUPTS],[hsc_cm01],[])
RTEMS_BSPOPTS_SET([BSP_USE_UART_INTERRUPTS],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_USE_UART_INTERRUPTS],[enable usage of interrupts for the UART modules])

RTEMS_BSPOPTS_SET([BSP_USE_UART2],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_USE_UART2],[if defined, enables UART2])

RTEMS_BSPOPTS_SET([HAS_UBOOT],[mpc8309som],[1])
RTEMS_BSPOPTS_SET([HAS_UBOOT],[mpc8313erdb],[1])
RTEMS_BSPOPTS_SET([HAS_UBOOT],[mpc8349eamds],[1])
RTEMS_BSPOPTS_HELP([HAS_UBOOT],[if defined, enables U-Boot support])

# Disable interrupt nesting for the interrupt server support.  The interrupt
# server is necessary for the USB stack.
RTEMS_BSPOPTS_SET([GEN83XX_ENABLE_INTERRUPT_NESTING],[mpc8313erdb],[])
RTEMS_BSPOPTS_SET([GEN83XX_ENABLE_INTERRUPT_NESTING],[br_uid],[])
RTEMS_BSPOPTS_SET([GEN83XX_ENABLE_INTERRUPT_NESTING],[*],[1])
RTEMS_BSPOPTS_HELP([GEN83XX_ENABLE_INTERRUPT_NESTING],[enable interrupt nesting])

RTEMS_BSPOPTS_SET([BSP_USB_EHCI_MPC83XX_HAS_ULPI],[br_uid],[1])
RTEMS_BSPOPTS_HELP([BSP_USB_EHCI_MPC83XX_HAS_ULPI],[the board has an ULPI PHY connected to the USB EHCI controller])

RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")

# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])

RTEMS_BSP_BOOTCARD_OPTIONS
RTEMS_BSP_CLEANUP_OPTIONS(0, 1)
RTEMS_BSP_LINKCMDS

RTEMS_PPC_EXCEPTIONS

AC_OUTPUT
